package com.wanma.Collection;

import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.stream.Collectors;


public class CollectorsTest {

	 public static void toCollectionTest(List<String> list) {
	      //  List<String> ll = list.stream().collect(Collectors.toCollection(LinkedList::new));
	        List<String> ll = list.stream().collect(Collectors.toList());
	        System.out.println(ll);
	    }
	  public static void mapingTest(List<String> list){
	        List<Integer> ll = list.stream().limit(5).collect(Collectors.mapping(Integer::valueOf,Collectors.toList()));
	        System.out.println(ll);  
	  }
	    public static void main(String[] args) {
//	        List<String> list = Arrays.asList("123","456","789","1101","212121121","asdaa","3e3e3e","2321eew");
//	       // toCollectionTest(list);
//	        mapingTest(list);
	    	
	    	
	    	
	    	
	    }
	    
	    
	    
}
